<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:73:"D:\phpStudy\WWW\web01\public/../application/index\view\teacher\index.html";i:1491295038;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <title>教师管理</title>
    <link rel="stylesheet" type="text/css" href="__STATIC__/bootstrap/css/bootstrap.min.css">
</head>

<body class="container">
	
    <hr />
    <div class="row">
        <div class="col-md-8">
            <form class="form-inline">
                <div class="form-group">
                    <label class="sr-only" for="name">姓名</label>
                    <input name="name" type="text" class="form-control" placeholder="姓名..." value="<?php echo input('get.name'); ?>">
                </div>
                <button type="submit" class="btn btn-default"><i class="glyphicon glyphicon-search"></i>&nbsp;查询</button>
            </form>
        </div>
        <div class="col-md-4 text-right">
            <a href="<?php echo url('add'); ?>" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i>&nbsp;增加</a>
        </div>
    </div>


    <div class="row">
        <div class="col-md-12">
        	<hr />
            <a href="<?php echo url('add'); ?>" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i>&nbsp;增加</a>
            <hr />
            <table class="table table-hover table-bordered">
                <tr class="info">
                    <th>序号</th>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>邮箱</th>
                    <th>用户名</th>
                    <th>创建时间</th>
                    <th>更新时间</th>
                    <th>操作</th>
                </tr>
                <?php if(is_array($teachers) || $teachers instanceof \think\Collection || $teachers instanceof \think\Paginator): $i = 0; $__LIST__ = $teachers;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                <tr>
                    <td><?php echo $vo['id']; ?></td>
                    <td><?php echo $vo['name']; ?></td>
                    <td><?php if($vo['sex'] == '0'): ?>男<?php else: ?>女<?php endif; ?></td>
                    <td><?php echo $vo['email']; ?></td>
                    <td><?php echo $vo['username']; ?></td>
                    <td><?php echo $vo['create_time']; ?></td>
                    <td><?php echo $vo['update_time']; ?></td>
                    <td><a href="edit?id=<?php echo $vo['id']; ?>">修改</a>|<a href="delete?id=<?php echo $vo['id']; ?>">删除</a></td>
                </tr>
                <?php endforeach; endif; else: echo "" ;endif; ?>
            </table>
            <?php echo $teachers->render(); ?> 
        </div>
    </div>
</body>

</html>